<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html lang="en">
<head>
<title>oec管理系统</title>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE10" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/bootstrap-responsive.min.css" />
<link rel="stylesheet" href="css/matrix-style.css" />
<link rel="stylesheet" href="css/matrix-media.css" />
<link rel="stylesheet" href="jquery-easyui/themes/default/easyui.css" />
<link rel="stylesheet" href="jquery-easyui/themes/icon.css" />
<script type="text/javascript" src="jquery-easyui/jquery.min.js"></script>
<script type="text/javascript" src="jquery-easyui/jquery.easyui.min.js"></script>
<style>
 .content-header{
/*   margin-top:-38px;
 */  font-size:16px;
  background-color:#fff;
 }
 .content-header table{
  font-weight:bolder;
  margin-left:30px;
 }
 .content-header .header-number{
  margin-left:10px;
 }
</style>
<script>
 $(document).ready(function(){
	 $.ajax({
			url:"<%=request.getContextPath()%>/task?method=taskcount",
			dataType:'json',
			type:'post',
			data:{},
			beforeSend:function(){
				
			},
			success:function(result){
				if(result.success){
					$("#count").text(result.count);
				}
			}
		})
	 //top menu
		var ddlMenu1 = $('#li1').menubutton({ menu: '#cusmenu1' }); 
		var ddlMenu2 = $('#li2').menubutton({ menu: '#cusmenu2' }); 

		//menubutton 依赖于 menu、linkbutton 这两个插件，所以我们可以这样搞定
		$(ddlMenu1.menubutton('options').menu).menu({
		            onClick: function (item) {
		            	if(item.id=='id1'){
		            		
		            	}else if(item.id=='id2'){
		                    window.open("<%=request.getContextPath()%>/task?method=assisttasks","_blank")

		            	}else if(item.id=='id3'){
		                    window.open("<%=request.getContextPath()%>/","_self")

		            		
		            	}else if(item.id=='id4'){
		            		
		            	}
		            }
		});
		$(ddlMenu2.menubutton('options').menu).menu({
		            onClick: function (item) {
		            	 if(item.id=='id4'){
		            	}
		            }
		});
 })
</script>
<script>
function logout(){
		$.messager.confirm('Confirm','Are you sure you want to logout?',function(r){
            if (r){
                $.post('<%=request.getContextPath()%>/logout',function(result) {
					if (result.success) {
						$.messager.show({ // show error message
							title : '提示',
							msg : '退出成功'
						});
			           }
				 else {
						$.messager.show({ // show error message
									title : '提示',
									msg : '登录已过期，重新登录'
								});
					   }
				}, 'json');
    			window.open('<%=request.getContextPath()%>/index.jsp','_self');
		     }
	});
}
function gohome(){
	window.open('<%=request.getContextPath()%>/dashboard','_self');
}
</script>
<script>
function changepass(li){
	$("#dlg1").dialog("open").dialog('setTitle','修改密码');
}
</script>
</head>
<body>
<!--Header-part-->
<div id="header">
  <h1><a href="dashboard.html">Matrix Admin</a></h1>
</div>
<!--close-Header-part--> 
<!-- header menu -->
<ul style="position:absolute;left:200px;top:20px;list-style:none;">

 <li id="li2" style="float:left;padding:5px;color:#0094ff;font-size:12px;" icon="icon-lightning" class="easyui-menubutton" onclick="gohome()">首页</li>
</ul>
<!-- header menu -->
<div id="welcome" >
<h3 style="position:absolute;top:5px;right:30px;font-size:16px;height:35px;line-height:32px;background:white;border-radius:10px 10px">
<a href="#"><span style="padding:5px;border-radius:10px 10px ;color:white;background:red;" id="count"></span></a>

<a href="#" class="easyui-menubutton" data-options="menu:'#mm5',iconCls:'icon-man'" style="color:#0094ff;">${sessionScope.assist.id }</a>
</h3>
</div>
<div id="mm5" style="width:150px;">
		<div data-options="iconCls:'icon-undo'" onclick="profile()">个人设置</div>
		<div class="menu-sep"></div>
		<div>我的任务</div>
		<div class="menu-sep"></div>
		<div>系统消息</div>
		<div class="menu-sep"></div>
		<div onclick="logout()">安全退出</div>
</div>

<!-- side bar start -->
<div id="sidebar" ><a href="#" class="visible-phone"><i class="icon icon-home"></i> Dashboard2</a>
  <ul>
    <li style="padding:10px 0 10px 15px;display:block;color:#fff"><i ></i> <span>个人设置</span></li>
    <li class="active"><a style="text-align:center;" href="<%=request.getContextPath()%>/profile?method=page"><span>个人资料</span></a> </li>
    <li onclick="changepass(this)"><a href="#" style="text-align:center;"><span>修改密码</span> </a></li>
  </ul>
</div>
<div id="content">
<h5 style="height:20px;line-height:37px;">个人资料卡</h5><hr/>
<div id="dlg1" class="easyui-dialog" style="width:400px;height:280px;padding:10px 20px"
        closed="true" buttons="#dlg-buttons1" >
    <div class="ftitle" style="text-align:center;">修改密码</div>
    <form id="fm1" method="post" novalidate>
        <div class="fitem">
            <label>旧密码:</label>
            <input name="password" class="easyui-textbox" required="true">
        </div>
        <div class="fitem">
            <label>输入新密码:</label>
            <input name="password2" class="easyui-textbox" required="true">
        </div>
    </form>
</div>
<div id="dlg-buttons1">
    <a href="javascript:void(0)" class="easyui-linkbutton c6" iconCls="icon-ok" onclick="updatepwd()" style="width:90px">Save</a>
    <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg1').dialog('close')" style="width:90px">Cancel</a>
</div>
</div>
<!--Footer-part-->
<div class="row-fluid">
  <div id="footer" class="span12"> 2016 &copy; <a href="http://themedesigner.in/">guangzhoushuntian information technology</a> </div>
</div>
<!--end-Footer-part-->

</body>
</html>
